refactored open operation.
resize tests refactored.
coding style.