* More bugfixes.

* Some refactoring.

Signed-off-by: swordmaster2k <b00056835@student.itb.ie>