Add test project. Fix some parsing bugs