Polished up the source a bit