improved prefix handling + comments