Fixed some lighting issues. Refactoring, reorganization, commenting