Update boxdev.c

cleaned up in boxdev code