Added more intelegent and overridable resolve
1.0.2