make flags in line with rfc
refactor the way commands are sent
add invalid command response