Combined front end and back end code

I'm not super comfortable with Git so hopefully I've done everything right. Let me know if anything needs changing.