add layout.properties and improve the api