Fix most compiler errors
Merge pull request #3 from erocs/master

Fix errors