Wrote generic tile manipulation class