Code cleared, some comments added