Tidying up and fixes

Hello! This is a minor pull request - just some tidying up and bug fixes for company completion and imenu support.