Update main.c

Made http URL to fetch general var; removed some legacy bmp layer stuff.