Refactoring and minor bug fixes