Code optimized and formated. Final commit