Closed #1, closed #2, closed #3, closed #6, small bugfixes