Basic cell entity detection working, code needs a lot of cleanup, both algorithimically and syntactically