Added more tests and bugfixes
Cleaned up Context a bit