Remove unused files.
Added basic logic.