Major refactoring, support for all types of contracts, fixed widget background