Add constraint checking, remove non-used code