Edits miscode functions