Implemented RJProto design pattern for executing JS functions selectively.