Major rewrite to make it account binding