[TIMOB-15000] Clean up code

Fixes [TIMOB-15000](https://jira.appcelerator.org/browse/TIMOB-15000)