Added administration for clients and companies

and some refactoring