Assorted bug fixes before pushing the code to live env.