Fixed compiler errors and some other minor changes...

Signed-off-by: Swizzy <swizzy@hotmail.co.uk>