Bug fixes, renamed stuff