Some minor changes, code was refactored, some instance variables were renamed