Added working code, more information to come.