Fixed some bugs, added support for Archive functionality