Shuffled around methods to improve code readability