bebob: code cleanup for command

Add some macros
Remove unused functions
Rename some functions according to its specifications