Some more helper functions

Unfortunately now requires stdc++ library
Remove STL due to memory concerns

Switching back to regular old arrays.