Move code to earlier point