[Forge] Cleaned up the code somewhat.