Removing unused code
Split up complex method