[WIP] Magic constants support complete. Needs more tests.