Reorganized code structure

~