whitespace and general code clean-up

Signed-off-by: Liew Zhao Wei <zhaoweiliew@gmail.com>