reorganize folders
use $ for query, remove unused code