Style and some hacks to make it work correctly.