Misc dev and optimizations

Signed-off-by: Ozan Turgut <ozanturgut@gmail.com>