yes and yes.
1.Find another Job ASAP.Leave GAP as small as possible.
2.Apply rugters or NJIT computer or stastis grad school for spring semester.
3.Apply canada gc for backup.
Don't be upset too much.Lay off is very common these days.Good luck!