Merge changes, clean code