Moving all the code in