Cleaned code / fixed a few things.