layout edit for API < 17 + scan test

scan tested and result parsed, only small problem with database, need to
add objects first!