Sticky walls

Implemented sticky walls.
Fixed bug mentioned in last commit.
Various other small tweaks.