Support build layers. Fix #1.