The middle class was using cast-iron bed frames with cotton-stuffed mattresses by the mid-1800s. A combination of a metal bedstead and a cotton mattress was less appealing to bugs. The first coil-spring bedding construction was patented in 1865. It took several years for it to be accepted and used in the household. Today, most people know this as a "bed-and-breakfast" type of arrangement. In the early days of rail travel, coaches were attached to railroad cars called "dormers." These had two sets of rails mounted on a frame that could be lowered to lie flat with a single bed standing up inside. When not in use, the dormer would be raised up onto its headboard to free up space underneath for more passengers. These beds were made from wood, usually maple, but also sycamore and hickory. The parts of the bed frame were made from different materials for flexibility and support. The posts at each end of the bed were made of steel or iron if you wanted them to be very strong. Sometimes they were also made of wood. If you wanted them to be very flexible, you could make them out of wire instead. In between the posts, there are crossbars on which to mount the bedding components: the headboard, footboard, and mattress. The pieces of bedding equipment were attached to the crossbars using leather straps or ropes.