Small fixes: typo + refactoring