Refactoring
code split
deinit optimization