added casts to suppress annoying warnings
moved firmware to it's own directory