Cleaned up bit more started adding code for variable sized tx

Signed-off-by Ajo Jose Panoor <ajopanoor@gmail.com>