More Freestanding Functions

Implemented more freestanding c functions, and edited some previously
uncaught errors