fix lots of error when using as anon and remove un-needed newlines and spaces