Tried to rationalize different things with comments : D