Migrating from Duemilanove to Mega 2560 issue

Hello, I made about 600 lines project including SD card reader, RTC clock and GSM shield for Arduino Duemilanove w ATmega 328. Goal of this project was to get RTC, load some data from SD card and then wait for incoming SMS and act according to loaded setup file. Everything went smoohtly, but in the end I ran out of memory, so I decided to migrate project to Arduino Mega 2560 R3 (16U2). I connected everything same way as with Duemilanove (tripple checked), but none of previously mentioned devices, which ran flawlessly now responds (I get only debug info I made via serial). Because theese Arduino boards should be compatible, I believe I miss something very basic (all the devices are voltage independent, so this should not be the issue) but canĀ“t figure out what and I am quite desperate.. Anybody help? Edit: I am using Arduino 1.5.8. with default libraries, except for GSM (slightly modified by Marco Martines) None of devices share SDA / SCL

Well I found out what was wrong, just posting it here if someone else run into same issue: - RTC is comunicating via SDA + SCL. On Arduino mega 2560 these are on different PINs. - SD card reader comunicate via MOSI, MISO and CLK which are on different pins too. - GSM module library have to be altered a bit to comunicate properly (Serial1 instead of Serial). I can post more details if anyone wish.

Seems like standard IO changes to make when from smaller hardware to bigger hardware.