Some random changes and cleanup