added profile support
cleaning up stuff...