Update for API changes, along with removing pointless and wrong code from the last commit

Signed-off-by: Ollie <dzineit@live.co.uk>
Merge pull request #5 from DziNeIT/master

Update for API changes and remove pointless and wrong code from the last commit