Fixing typo bugs, weak dictionary bugs, adding logging, handle type enforcement, etc