design updates and cleaning up the code