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

Signed-off-by: Ollie <dzineit@live.co.uk>