Refactored, some comments, and some small bugfixes (need to change from
session attribute in information text)