Restructure Meteor code