Reading the errors this may not be useable, i need to rewrite slowly.