Clean up kernel platform

Cleaned up the syntax in ```kernel/platform```. What was changed focused on syntax, mainly indentation, whitespace, single quoted strings, method invocation with parentheses, ```or```, ```and``` and ```return``` statements.