Hash remove function and boolean flag fixes