Changed the order of imports to match pep8 - not sure if this is the done thing