Fixed some AdHoc bugs and implement a few more functions

Why commented out?