Fixing up a few issues based on code review