Cleanup code before railsify