line breaks
minor optimizations
code organization
fix tmpSearch validation
Merge branch 'new-version' of github.com:guilhermehn/AMR into new-version