moving level calculation to calculateTree so it can be used in dimension providers
take level into consideration when calculating dimensions
cleaning up ambiguous css names