Lab2 work in progress. Helper functions, touchups