Merge pull request #57 from anidev/master

Changes I made
Ports fixed, somewhat
Fix inexplicable unexplainable undefined references
Merge pull request #58 from anidev/master

More changes I made