Added 3 features/bugs

See comments in commit