Add manifest class
Code cleanup, reorganize