Moving code to new structure