Updated, simplified and general clean up