Improve naming and cleanup top level methods

Also-by: Samnang Chhun <samnang.chhun@gmail.com>