more good programming practises

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