substantial refactoring: class reorganization, old non-used components removed. Also, committing Phuong's new variable-based models.