Add options, fix image bug, some rafactoring