Some initial fixes

Dear Yulia!

I made some fixes (know project is compilable). See my commits.
I have some notes and suggestions, let's discuss them on skype or e-mail.

Alex.

P.S. Add me to collaborations of your project.