cleaned up some code
fixing conflicts