Added in one-way variables. Some testing could help, but everything seems working.