some more bugfixes and set up some functions for future implementation of features