Reverted all changes (not tested sufficiently)