Added functionality, bugfixes