major code cleanup in progress, run and fix golint issues