huge code / db simplification