Added some dependancies and tidied stuff up