Structure and complexity in non-convex and non-smooth optimization