Cleaned code a bit.