Cleaned up some code and comments
Improved function handling
Added string creation