Fixed some silly mistakes. Also got local env to work.