Move code around for better readability