refactor: derive methods, fix codestyle