Clean up kernel platform

Cleaned up the syntax in ```kernel/platform```. Changes focus on indentation, whitespace, single quoted strings, method invocation with parentheses, ```or```, ```and``` and ```return``` statements.