* calculate track height
* remove unused global vars