Ported a few elements from old interface and implemented barebones Session interface