various more updates; removed many globals and cleaned up the architecture.

Signed-off-by: Garet Claborn <garet@approachfoundation.org>
Merge branch 'master' of https://github.com/Approach/Approach

Conflicts:
	project/map.php