Modifications to work with VS2010