Refactoring / some cleanup stuff added