made math functions use Long and other fixes
Moved main dir to top of src
wip