Worked out some of the local environment bugs