clean up

cleaning up code and little improvements