API file refactoring and getting ready for keypair generation