[TIMOB-14281] Code Refactor

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