use oc6 appframework, remove tons of code, make template slimmer and easier