code refactor, added items pages, global vars under env