Completed basic set of functions

Minor bugfixes and added all remaining functions