added requirements
Major code refactorisation.