fixed almost all bugs. removed unuseful resources.