Fixing imports and implementing the <poll> command
Fixing response to be specific with result codes,
implementing Poll response
Updating lock (similarly to how poll works)
Refactoring
refactoring in to functions