added clearAfterInit, re-orgged files