At last, a solution!
Turns out the major error was using serial.print instead of serial.write.
Thanks for all the help!