Change Frame and Surface interface
Fix some compilation errors