Bunch of stuffs, including error space, session validation, and formatting