Bug fixes + clean comments