Added some fixes for dictionary insertion/removal as well as the type primitive)