Reformated code. Tabs to spaces. Identations
Big refactoring