Fixed and cleaned up