template overhaul

addresses #2 - may still have issues and bugs, but those will be sorted out shortly.