Refactor aes main function
Use uint8_t instead of unsigned char and define a byte type
Refactor declarations for clarity