Clean up footprint behaviour and code to make it a bit more reliable.