Re-factor code to controller base system [Work in Progress]