Cleanup code

#262