Small fixes, improving general code quality