update code format
remove unuseful code
add one swap cost field in test swap view