First commit of code

 - Not very clean and tidy but it works!