Cleanup, moved template loading to new function, started inline directions