Reimplement locals
(kinda) fix classes