some code cleanup and added androidbinding