Refactor code; remove YUI extension for now