Feature/fix key munging

Fix the key munging to work with keys not containing "::"

(sadly, also contains my previous PRs - let me know if you want me to rebase and re-submit)