Improved flow and added safeties