Cleaning up from scala code