Add flip panel for book info UI.

Also clean up the code.