Bugfix + commenting functions