Study on growth optimization and metallization of AlN thin films