Ported to API & It Works!

removed redundant prefixes to variables and functions