I was having problems with it not returning correctly when made local. This file really needs more work to make it class based anyway.