corrected mode check, initial tweaks to original BookIt class