Bug fixes and queueing

- Fixed a number of bugs and typos in the method names
- Added ifdefs in all the headers to avoid conflicts
- Implemented request queueing and update the protocol to support this