More Cleaning

Changed the order some operations are called and cleaned each one.