started cleaning up code