Added whitelist checking, fixed bugs

Created method to check if ID is in whitelist
Fixed bug with buffer leftovers every loop
Removed uncessary free and malloc
Added method to reset card fields