Fixed build problems

Fixed some build problems and removed useless console project.