cleaning up code so it can work with cloud9