added rails at intersections and fixed most other bugs; will merge with new decorator later