Bug fixes and re-naming