Added Removal of the implicit context. Bug fix: Code of PartitionRule and Typing rule was swapped (?)