some refactoring and main project API access point