Added 5 attempt limit and system to allow additional. Other minor tweaks