Fix $# expands
Add tests