tidied up and namespaced everything.
only include relevant headers - don't pollute too much.