cleaning up code and layout changes