Move code to common location