Some changes, added resource manager