refactoring

updated the code to change from prototype into base for a framework.