Rewrote all existing functions

(Due to them being bullshit.)

All functions now require integers!