Fixed build, added test cases, added base directives
Merge remote-tracking branch 'origin/master'