cleanup and some comments...it still doesn't rly work