changed project so that it works on mono
fixed some bugs