Fixed dependencies and setup master

Please merge this into your master and branch from this to develop.